﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master"  AutoEventWireup="true" Inherits="Nivdal.TeamListOfPlayers" Title=""
    StylesheetTheme="SkinFile" Theme="SkinFile" Codebehind="TeamListOfPlayers.aspx.cs" %>

<%@ Register Assembly="obout_Flyout2_NET" Namespace="OboutInc.Flyout2" TagPrefix="cc1" %>

<asp:Content ID="HeadContent" ContentPlaceHolderID="HeadPlaceHolder" runat="server">
    <script language="javascript" type="text/javascript">

        $(function () {
            $("#ctl00_ctl00_ContentPlaceHolder3_ContentPlaceHolder1_SummaryGridview").tablesorter();
        })
        

    </script>
</asp:Content>
<asp:Content ID="PageNameContent" ContentPlaceHolderID="PageNamePlaceHolder" runat="server">
    <asp:Label ID="PageNameLabel" runat="server" Text="<%$ Resources:Resource, TeamListOfPlayers_PageNameLabel %>"  CssClass="PageNameContentStyle"></asp:Label>
    <asp:HyperLink ID="TeamHyperLink" runat="server" Text="<%$ Resources:Resource, Global_Team %>"  CssClass="PageNameContentStyle"></asp:HyperLink>
    <asp:Label ID="PostTeamNameLabel" runat="server" Text="<%$ Resources:Resource, TeamListOfPlayers_PostTeamNameLabel %>"  CssClass="PageNameContentStyle"></asp:Label>
    
</asp:Content>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:HiddenField ID="IsTeamOwnerHiddenField" runat="server" />
    <asp:HiddenField ID="IsNationalHiddenField" runat="server" />
    <asp:Panel ID="ErrorLabelPanel" runat="server" Visible="false">
        <div class="basic_element padding5">
            <asp:Label ID="ErrorLabel" runat="server" Text=""></asp:Label>
        </div>
    </asp:Panel>
    <div class="basic_element">
    <div class="red_title">
        <asp:Label ID="NumberOfPlayersLabel" runat="server" CssClass="white_title"></asp:Label>
    </div>
    <div class="padding5">
        <asp:GridView ID="SummaryGridview" runat="server" AutoGenerateColumns="false" AllowPaging="false" SkinID="SimpleProfessional"
         DataSourceID="TeamListOfPlayersSqlDataSource" UseAccessibleHeader="true">
            <Columns>
                <asp:TemplateField HeaderText="<%$ Resources:Resource, Global_Player %>" ItemStyle-Width="33%">
                    <HeaderStyle CssClass="CursorPointer" />
                    <ItemTemplate>
                        <asp:Label ID="PlayersSortLabel" runat="server" Text='<%# ShirtNumberForSort(Eval("ShirtNumber")) + " " + Eval("Name") %>' style="display:none;" ></asp:Label>
                        <asp:Hyperlink ID="FlagImageButton" runat="server" ImageUrl='<%# Eval("Flag", "~/Images/Flags/{0}") %>'
                        ToolTip='<%# Eval("CountryName") %>' NavigateUrl='<%# Eval("Nationality", "Country.aspx?Id={0}") %>'></asp:Hyperlink>
                        <asp:Label ID="ShirtNumberLabel" runat="server" Text='<%# Eval("ShirtNumber") %>' SkinID="GridLabel"></asp:Label>
                        <asp:HyperLink ID="PlayerHyperlink" runat="server" SkinID="GreenTitleHyperLink" ToolTip='<%# Eval("Name") %>'
                        NavigateUrl='<%# "~/Player.aspx?Id=" + Eval("Id") %>' Text='<%# Eval("ShortName") %>'></asp:HyperLink>
                        &nbsp;
                       <asp:Image ID="YellowCard1Image" runat="server" ImageUrl="~/Images/Icons/players_yellow.jpg" 
                        Visible='<%# Eval("OneYellowVisible") %>' ToolTip='<%# Eval("WarningsToolTip") %>' />
                        <asp:Image ID="YellowCard2Image" runat="server" ImageUrl="~/Images/Icons/players_yellow.jpg" 
                        Visible='<%# Eval("SecondYellowVisible") %>' ToolTip='<%# Eval("WarningsToolTip") %>' />
                        <asp:Image ID="RedCardImage" runat="server" ImageUrl="~/Images/Icons/players_red.jpg" 
                        Visible='<%# Eval("RedVisible") %>' ToolTip='<%# Eval("WarningsToolTip") %>' />
                        &nbsp;
                        <asp:Image ID="InjuryImage" runat="server" ImageUrl='<%# InjuryIconName(Eval("InjuryRowData")) %>'  AlternateText='<%# Eval("Injury") %>'
                            ToolTip='<%# Eval("Injury") %>' Visible='<%# Eval("IsInjured") %>' />
                        <asp:Image ID="ForSaleImage" runat="server" ImageUrl="~/Images/Icons/atuk.png"  AlternateText="<%$ Resources:Resource, ListOfplayers_ForSaleToolTip %>"
                        ToolTip="<%$ Resources:Resource, ListOfplayers_ForSaleToolTip %>" Visible='<%# Eval("IsForSale") %>' />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField  ItemStyle-Width="6%">
                    <HeaderTemplate>
                        <asp:Label ID="AgeHeaderLabel" runat="server" Text="<%$ Resources:Resource, Global_AgeAbbreviation %>"
                         ToolTip="<%$ Resources:Resource, Global_Age %>"></asp:Label>
                    </HeaderTemplate>
                    <ItemTemplate>
                         <div style="display:none;"><%# Eval("AgeSort") %></div>
                    <asp:Label ID="AgeLabel" runat="server" Text='<%# Eval("Age") %>' SkinID="GridLabel" ToolTip='<%# Eval("AgeTollTip") %>' />
                    </ItemTemplate>            
                </asp:TemplateField>
                <asp:TemplateField HeaderText="<%$ Resources:Resource, Global_BestPositions %>" ItemStyle-Width="12%">
                    <HeaderStyle CssClass="CursorPointer" />
                    <ItemTemplate>
                        <asp:Label ID="BestPositionSortLabel" Text='<%# Eval("BestPositionSortText") %>' runat="server" style="display:none;"></asp:Label>
                        <asp:Label ID="BestPositionsTitleLabel" runat="server" Text='<%# Eval("BestPositions") %>' SkinID="GridLabel"
                         ToolTip='<%# Eval("BestPositionsToolTip") %>'></asp:Label>
                    </ItemTemplate>                
                </asp:TemplateField>
                <asp:TemplateField ItemStyle-Width="6%">
                    <HeaderStyle CssClass="CursorPointer" />
                    <HeaderTemplate>
                        <asp:Label ID="FitnessHeaderLabel" runat="server" Text="<%$ Resources:Resource, Global_FitnessHeader %>"  ToolTip="<%$ Resources:Resource, Global_Fitness %>"></asp:Label>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label ID="FitnessLabel" runat="server" Text='<%# Eval("Fitness") + "%" %>' 
                        SkinID="GridLabel" ToolTip="<%$ Resources:Resource, Global_Fitness %>" />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField ItemStyle-Width="6%">
                    <HeaderStyle CssClass="CursorPointer" />
                    <HeaderTemplate>
                        <asp:Label ID="StrongFootHeaderLabel" runat="server" Text="<%$ Resources:Resource, Global_StrongFootHeader%>" 
                        ToolTip="<%$ Resources:Resource, Global_StrongFoot %>"></asp:Label>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label ID="StrongFootLabel" runat="server" Text='<%# Eval("StrongFootShort") %>' SkinID="GridLabel" 
                        ToolTip='<%# Resources.Resource.Global_StrongFoot + ": " + Eval("StrongFoot") %>' />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField ItemStyle-Width="6%">
                    <HeaderStyle CssClass="CursorPointer" />
                    <HeaderTemplate>
                        <asp:Label ID="CharismaHeaderLabel" runat="server" Text="<%$ Resources:Resource, Global_CharismaTitleLabel %>"  ToolTip="<%$ Resources:Resource, Global_Charisma %>"></asp:Label>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label ID="CharismaLabel" runat="server" Text='<%# Eval("Charisma") %>' SkinID="GridLabel" ToolTip="<%$ Resources:Resource, Global_Charisma %>" />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField ItemStyle-Width="6%">
                    <HeaderStyle CssClass="CursorPointer" />
                    <HeaderTemplate>
                        <asp:Label ID="ExperienceHeaderLabel" runat="server" Text="<%$ Resources:Resource, Global_ExperienceHeader %>"  ToolTip="<%$ Resources:Resource, Global_Experience%>"></asp:Label>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <asp:Label ID="ExperienceLabel" runat="server" Text='<%# Eval("Experience") %>' SkinID="GridLabel" ToolTip="<%$ Resources:Resource, Global_Experience %>" />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField ItemStyle-Width="25%">
                    <HeaderStyle CssClass="CursorPointer" />
                    <HeaderTemplate>
                        <asp:Label ID="LastMatchRatingHeaderLabel" runat="server" Text="<%$ Resources:Resource, TeamListOfPlayers_LastMatchRatingInfo %>"
                         ToolTip="<%$ Resources:Resource, TeamListOfPlayers_LastMatchRatingInfo %>"></asp:Label>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <div style="display:none;"><%# FirstTwoLetters(Eval("LastMatchInfo")) %></div>
                        <asp:Label ID="LastMatchRatingLabel" runat="server" Text='<%# Eval("LastMatchInfo") %>' SkinID="GridLabel"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <EmptyDataTemplate>
                <asp:Label ID="NoPlayersLabel" runat="server" Text="<%$ Resources:Resource, TeamListOfPlayers_NoPlayersText %>" SkinID="GridLabel"></asp:Label>
            </EmptyDataTemplate>
        </asp:GridView>
        <asp:SqlDataSource ID="TeamListOfPlayersSqlDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
            SelectCommand="Nivdal_GetListOfPlayersForTeam" SelectCommandType="StoredProcedure">
        </asp:SqlDataSource>
    </div>
    </div>
    
    
</asp:Content>
